-
-
Notifications
You must be signed in to change notification settings - Fork 145
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lab tasks 1, 2, 3, 4, 5, 6, 7, 8, 9, a #52
base: master
Are you sure you want to change the base?
Conversation
@@ -14,7 +14,7 @@ | |||
отдает массив нечетных чисел из диапазона [15, 30] включая крайние числа. | |||
|
|||
## Функции | |||
|
|||
~~~~ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you committing changes to readme?
@@ -1,5 +1,5 @@ | |||
'use strict'; | |||
|
|||
const year = undefined; | |||
const year = 1917; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1,5 +1,5 @@ | |||
'use strict'; | |||
|
|||
const hello = null; | |||
const hello = name => console.log(`Hello, ${name}!`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const hello = name => console.log(`Hello, ${name}!`); | |
const hello = name => { | |
console.log(`Hello, ${name}!`); | |
}; |
We use single line functions when outer function need to return value of internal call.
const range = null; | ||
|
||
const range = (start, end) => { | ||
const arr = []; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You may allocate array with final length. See solution: https://github.com/HowProgrammingWorks/Reusable/blob/master/Solutions/4-range.js
|
||
const findPhoneByName = null; | ||
const findPhoneByName = name => { | ||
for (const number of phonebook) number.name === name ? number.phone : null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will return undefined.
No description provided.